package com.rc.web.controller;


import com.rc.pojo.vo.poi.PoiResultVo;
import com.rc.web.service.impl.PoiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 地理编码搜索接口
 */
@RestController
public class PoiController {

    @Autowired
    private PoiService poiService;

    @GetMapping("/poi/search")
    public PoiResultVo searchPoi(
            @RequestParam String keywords,
            @RequestParam String city,
            @RequestParam(defaultValue = "1") int pageNum,
            @RequestParam(defaultValue = "10") int pageSize) throws Exception {
        return poiService.searchPoi(keywords, city, pageNum, pageSize);
    }
}